package opengameflow.framework.graphics;

import opengameflow.framework.utils.Rectangle;
import android.app.Activity;
import android.view.Display;
import android.view.WindowManager;

public class DisplayMode extends Activity{

	private Display display;
	private int height;
	private int width;
	private SurfaceFormat surfaceFormat;
	private Rectangle tileSafeArea;
	private float aspectRatio;
	
	public DisplayMode() {
		
		display = getWindowManager().getDefaultDisplay(); 
		this.init();

	}

	public DisplayMode(WindowManager manager) {
		
		display = manager.getDefaultDisplay(); 
		this.init();
	}
	
	private void init() {
		height = display.getHeight();
		width = display.getWidth();
		
		aspectRatio = (float)width / (float)height;
		
	}
	
	public int getHeight() { return height; }
	public int getWidth() { return width; }
	public float getAspectRatio() { return aspectRatio; }
	public Rectangle getTileSafearea() { return tileSafeArea; }
	public SurfaceFormat getsurfaceFormat() { return surfaceFormat; }
}
